package com.anjubao.parking.municipal.roadside.config.quartz.job;


import com.anjubao.parking.municipal.roadside.mapper.ParkingRecordMapper;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;


@DisallowConcurrentExecution
public class ParkingIllegalCheckJob implements Job {

    /**
     * 违规
     * 情况一：未缴费但停车超过15分钟
     * 情况二：已缴费未离场，但超时停车超过1小时
     * 情况三：已离场
     *         缴费：超时离场超过5分钟
     *         未缴费：15分钟内不收费
     */

    private static final Logger LOG = LoggerFactory.getLogger(ParkingIllegalCheckJob.class);

    @Autowired
    private ThreadPoolTaskExecutor executor;

    @Autowired
    private ParkingRecordMapper parkingRecordMapper;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
       /* executor.submit(()->{
            parkingRecordMapper.checkLegal();
        });
*/
    }
}
